import { } from "react";
import { Button, Card, ResultPage } from "antd-mobile";
import { useNavigate, useSearchParams } from "react-router-dom";

const Index = () => {
  const navigate = useNavigate();
  const [sq] = useSearchParams();
  console.log(sq.get("out_trade_no"));
  const details = [
    {
      label: "收款方",
      value: "张三",
      bold: true,
    },
    {
      label: "付款方式",
      value: "账户余额",
    },
    {
      label: "转账金额",
      value: "¥100.00",
    },
    {
      label: "转账金额",
      value: "¥100.00",
    },
    {
      label: "转账金额",
      value: "¥100.00",
    },
  ];

  return (
    <ResultPage
      status="success"
      title="操作成功"
      description="内容详情可折行，建议不超过两行建议不超过两行建议不超过两行"
      details={details}
    >
      <Card>
        <Button onClick={() => navigate("/")}>返回首页</Button>
      </Card>
    </ResultPage>
  );
};

export default Index;
